from django.db import models

# Create your models here.

class Date(models.Model):
    data1 = models.DateTimeField(auto_now=True)
    data2 = models.DateTimeField(auto_now_add=True)
    class Meta:
        abstract=True
class News(Date):
    title = models.CharField(max_length=50)
    content = models.CharField(max_length=200)
    class Meta:
        db_table = 'news'
        verbose_name = '新闻'
        verbose_name_plural=verbose_name
class Users(Date):
    username =models.CharField(max_length=50)
    password =models.CharField(max_length=50)

    class Meta:
        db_table = 'users'
        verbose_name = '登录'
        verbose_name_plural=verbose_name
